/**
* @Author: yizhigopher
* @Description: simple db implementation
* @File: db.go
* @Version: 1.0.0
* @Date: 2023/12/21 21:09:35
 */

// bitcask each entity in disk:
// | crc(4B) | timestamp(4B) | key_size(4B) | value_size(4B) | key... | value... |

// Morever the folder is the instance of  bitcask,
// Only one file can be change, and if this file is closed, it cannot be changed

// Each writing will append entity into active file. Delete operation is logical del

// keydir will 

package db

type DB struct {
	DBName string
	cache  map[string]string
}

type DBInterface interface {
	Open()
	Close()
	Read(key string) (string, error)
	Write(key string, value string) error
}

func (db *DB) Open() {
	panic("not implemented") // TODO: Implement
}

func (db *DB) Close() {
	panic("not implemented") // TODO: Implement
}

func (db *DB) Read(key string) (string, error) {
	panic("not implemented") // TODO: Implement
}

func (db *DB) Write(key string, value string) error {
	panic("not implemented") // TODO: Implement
}
